package meiyunting.shiwuzhaoling.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

/**
 * 活动报名服务客户端
 * 使用FeignClient进行服务调用，结合负载均衡
 */
@FeignClient(
    name = "activity-service", 
    fallback = ActivityServiceClientFallback.class,
    configuration = ActivityServiceFeignConfig.class
)
public interface ActivityServiceClient {
    
    /**
     * 获取用户参与的活动
     * @param userId 用户ID
     * @return 活动列表
     */
    @GetMapping("/api/activities/user/{userId}")
    List<Map<String, Object>> getUserActivities(@PathVariable("userId") Long userId);
} 